# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=guile-bytestructures
pkgver=2.0.1
pkgrel=0
pkgdesc="Structured access library to bytevector contents for Guile"
url="https://github.com/TaylanUB/scheme-bytestructures"
arch="all"
license="GPL-3.0-or-later"
depends="guile"
makedepends="automake autoconf guile-dev"
options="!strip" # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907061
source="https://github.com/TaylanUB/scheme-bytestructures/archive/v$pkgver/guile-bytestructures-$pkgver.tar.gz
	fix-tests.patch"
builddir="$srcdir/scheme-bytestructures-$pkgver"

prepare() {
	default_prepare
	autoreconf -vfi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
fae28908e8efaa3c675a2e47bcaff05c6449a42537ebf0f5f630c80b0c370af41dea09e2f7d8f4b1aec8edca388a817ac80dcd223bcbfbca4c12828ce0149eb8  guile-bytestructures-2.0.1.tar.gz
e68a59e1704cdf642c18d4552e92de1cbb58b1f9c5a4f1a8c5dfea6e176379911eddb6043d5abddb65dd5087bad1a33d841984ba3dddaa1b355ec114637d0643  fix-tests.patch
"
